<%-- 
    Document   : index
    Created on : Sep 16, 2013, 3:44:38 PM
    Author     : CHIP
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
        <title>Thông tin chi tiết</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript"src="js/validateComment.js"></script>
        <script>
            var check = true;
            function show(){
                if(check==true){
                    document.getElementById("areaComment").style.border = "2px solid #52CC52";
                    document.getElementById("areaComment").style.width = "410px";
                    document.getElementById("areaComment").style.height = "100px";
                    document.getElementById("subComment").style.opacity = "1";
                    check = false;
                }else{
                    document.getElementById("areaComment").style.border = "2px solid #CCCCCC";
                    document.getElementById("areaComment").style.width = "300px";
                    document.getElementById("areaComment").style.height = "40px";
                    document.getElementById("subComment").style.opacity = "0";
                    check = true;
                }
            }
           
        </script>

        <script>
            
        </script>
    </head>

    <body>
        <%-- Check session CHECKEXISTXML, If null marshall XML --%>
        <c:set var="check" value="${sessionScope.CHECKEXISTXML}"/>
        <c:if test="${check eq null}">
            <jsp:forward page="/Info">
                <jsp:param name="action" value="marshall"/>
                <jsp:param name="currentUrl" value="detail.jsp?id=${param.id}"/>
            </jsp:forward>
        </c:if>
        <c:import var="xmldoc" url="xml/information.xml" charEncoding="UTF-8" />
        <c:import var="xsltDetail"  url="xslt/detail.xsl" charEncoding="UTF-8"/>
        <%-- Import file for comment  --%>
        <c:import var="xmlComment" url="xml/comment.xml" charEncoding="UTF-8" />
        <c:import var="xsltComment"  url="xslt/comment.xsl" charEncoding="UTF-8"/>
        <%-- End Check session CHECKEXISTXML --%>

        <div id="nav">
            <jsp:include page="nav.jsp"/>
        </div> <!-- nav #end -->

        <div id="header">
            <jsp:include page="header.jsp"/>
        </div> <!-- header #end -->

        <div id="wrapper">
            <div id="content">
                <div class="content_top">
                    <div class="content_bottom" id="parent">
                        <x:transform xml="${xmldoc}" xslt="${xsltDetail}">
                            <x:param name="id" value="${param.id}"/>
                        </x:transform>


                        <div id="mainCm">
                            <div class="mainComment" id="mainComment">
                                <div class="titleCM">Bình luận<span id="commentStatus" class="commentStatus"></span></div>
                                <textarea onclick="return show();" style="transition:width 1s, height 1s, transform 0.7s;" id="areaComment" name="txtComment" placeholder="Để lại bình luận..."></textarea>
                                <div class="subComment" id="subComment">
                                    <input type="text" id="txtName" name="txtName" placeholder="Tên của bạn"/><br/>
                                    <input type="text" id="txtEmail" name="txtEmail" placeholder="Email của bạn"/><br/>
                                    <input type="hidden" id="txtInfoId" value="${param.id}"/>
                                    <input style="width: 203px;" onclick="return validateComment();" type="button" name="" value="Gửi Bình Luận"/>
                                </div>
                            </div>
                            <!-- Load comment -->
                            <x:transform xml="${xmlComment}" xslt="${xsltComment}">
                                <x:param name="id" value="${param.id}"/>
                            </x:transform>
                            <!-- End Load comment -->
                        </div>
                    </div>
                </div>
            </div> <!-- content #end -->

            <div id="sidebar" class="sidebar_spacer" >

                <div class="widget widget_nav_menu">
                    <jsp:include page="menu.jsp"/>
                </div>

                <div class="widget Widget_Simplicy_Post">
                    <jsp:include page="news-inc.jsp" />
                </div> <!-- And div widget Widget_Simplicy_Post -->

            </div> <!-- wrapper #end -->
        </div>
        <div id="footer">
            <jsp:include page="footer.jsp"/>
        </div><!--footer end-->
    </body>
</html>
